package com.tinckay.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;

import java.io.Serializable;

import com.tinckay.common.constant.ProjectConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 泵车基本信息
 * </p>
 *
 * @author Jean
 * @since 2018-11-06
 */
@Data
@TableName("base_pump_info")
@ApiModel(value = "PumpInfo对象", description = "泵车基本信息")
public class PumpInfo extends Model<PumpInfo> {

    private static final long serialVersionUID = 8362241324993341079L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "泵车编号")
    @NotBlank(message = "泵车编码不能为空", groups = {ProjectConstant.Save.class, ProjectConstant.Update.class})
    private String code;

    @ApiModelProperty(value = "泵车厂家")
    private String factory;

    @ApiModelProperty(value = "泵车型号")
    private Integer model;

    @ApiModelProperty(value = "泵车备注")
    private String resume;

    @ApiModelProperty(value = "泵车操作员")
    private String optUser;

    @NotBlank(message = "泵车绑定IP不能为空", groups = ProjectConstant.Save.class)
    @ApiModelProperty(value = "泵车绑定IP")
    private String ip;

    @NotBlank(message = "泵车绑定IP人", groups = ProjectConstant.Save.class)
    @ApiModelProperty(value = "泵车绑定IP人")
    private String bandIpUser;

    @ApiModelProperty(value = "泵车绑定IP时间")
    private LocalDateTime bandIpTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人", hidden = true)
    private String creator;

    @ApiModelProperty(value = "创建时间", hidden = true)
    private LocalDateTime createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
